home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / Duchess.dxr / playing cards_56_f hotz.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  1.8 KB  |  71 lines

  1. property spriteNum, row
  2. global stock, foundation, equal, currentsel, getlist, reserve, godlist, basecard, leftlist, rightlist
  3.  
  4. on beginSprite me
  5.   basecard = VOID
  6.   row = determinerow()
  7. end
  8.  
  9. on determinerow me
  10.   if spriteNum = 21 then
  11.     return #fone
  12.   else
  13.     if spriteNum = 22 then
  14.       return #ftwo
  15.     else
  16.       if spriteNum = 23 then
  17.         return #fthree
  18.       else
  19.         if spriteNum = 24 then
  20.           return #ffour
  21.         end if
  22.       end if
  23.     end if
  24.   end if
  25. end
  26.  
  27. on mouseEnter me
  28.   if basecard <> VOID then
  29.     if getlist <> VOID then
  30.       if foundation[row].getcardcount() = 0 then
  31.         if getlist.getlastcard().rank = basecard then
  32.           equal = 1
  33.           currentsel = spriteNum - 4
  34.           godlist = foundation[row]
  35.         end if
  36.       else
  37.         if foundation[row].getcardcount() > 0 then
  38.           if (getlist.getlastcard().rankvalue = (foundation[row].getlastcard().rankvalue + 1)) and (getlist.getlastcard().suit = foundation[row].getlastcard().suit) then
  39.             equal = 1
  40.             currentsel = spriteNum - 4
  41.             godlist = foundation[row]
  42.           else
  43.             if (getlist.getlastcard().rank = "ace") and (foundation[row].getlastcard().rank = "king") and (getlist.getlastcard().suit = foundation[row].getlastcard().suit) then
  44.               equal = 1
  45.               currentsel = spriteNum - 4
  46.               godlist = foundation[row]
  47.             end if
  48.           end if
  49.         end if
  50.       end if
  51.     end if
  52.   else
  53.     if (the clickOn <> 12) and (the clickOn <> 0) and (the clickOn <> 10) then
  54.       if getlist <> VOID then
  55.         if objectp(reserve[sprite(the clickOn).row]) then
  56.           equal = 1
  57.           equal = 1
  58.           currentsel = spriteNum - 4
  59.           godlist = foundation[row]
  60.         end if
  61.       end if
  62.     end if
  63.   end if
  64. end
  65.  
  66. on mouseLeave me
  67.   equal = 0
  68.   currentsel = 0
  69.   godlist = VOID
  70. end
  71.